import request from "@/utile/request.js";

 // http://82.157.146.153:8090/admin/auth/login
export function login(data) {
    return request(
        {
            url: 'admin/auth/login',
            method: 'post',
            data:data
        }   )
    }
// http://82.157.146.153:8090/admin/goods/list?page=1&limit=20&sort=add_time&order=desc
// export function shopList() {
//     return request(
//         {
//             url: 'admin/goods/list?page=1&limit=20&sort=add_time&order=desc',
//             method: 'get',
//         }
//     )
// }
export function shopList(pages=1) {
    return request(
        {
            url: `admin/goods/list?page=${pages}&limit=20&sort=add_time&order=desc`,
            method: 'get',
        }
    )
}

// http://82.157.146.153:8090/admin/comment/list?page=1&limit=20&sort=add_time&order=desc
export function shopComment(pages=1,limit=20) {
    return request(
        {
            url: `admin/comment/list?page=${pages}&limit=${limit}&sort=add_time&order=desc`,
            method: 'get',
        }
    )
}
// http://82.157.146.153:8090/admin/goods/detail?id=1181183
export function detail(id) {
    return request(
        {
            url: `admin/goods/detail?id=${id}`,
            method: 'get',
        }
    )
}